#pragma once

// c
#include <assert.h>

// opengl
#include <glew.h>
#include <gl/GL.h>
#include <gl/GLU.h>
#include <gl/glext.h>
#include <gl/wglext.h>

// direct input
#include <dinput.h>

// c++ stl
#include <string>
#include <map>
#include <vector>

#include "WSObject.h"

// Macros
#define WS_SAFE_DELETE(p)						if (p != NULL) { delete p; p = NULL; }
#define WS_SAFE_DELETE_ARRAY(p)					if (p != NULL) { delete [] p; p = NULL; }
#define WS_SAFE_RELEASE(p)						if (p != NULL) { p->Release(); p = NULL; }

#define WS_CREATE_FUNC(__TYPE__)\
static __TYPE__* create()\
{\
	__TYPE__ *pRet = new __TYPE__();\
	if (pRet && pRet->init())\
	{\
		pRet->autorelease();\
		return pRet;\
	}\
	else\
	{ \
		delete pRet;\
		pRet = NULL;\
		return NULL;\
	} \
}